<div class="col-12">
    <div class="card">
        <div class="card-header">
            <h3 class="card-title">{{.label}}</h3>
            <div class="card-tools">
                <div class="input-group input-group-sm" style="width: 250px;">
                    <a class="btn btn-success btn-sm" data-toggle="modal" data-target="#addModal">
                        <i class="fa fa-plus "></i>
                    </a>
                    <input id="search-key" type="text" name="table_search" class="form-control float-right"
                           placeholder="平台关键字" value="{{ .key }}">
                    <div class="input-group-append">
                        <a type="submit" class="btn btn-default" id="search-a">
                            <i class="fa fa-search" style="color: grey"></i>
                        </a>
                    </div>
                </div>
            </div>
        </div>
        <!-- /.card-header -->
        <div class="card-body table-responsive p-0">
            <table class="table table-hover text-nowrap ">
                <thead>
                <tr>
                    <th>ID</th>
                    <th>项目</th>
                    <th>平台</th>
                    <th>发布IP</th>
                    <th>中转IP</th>
                    <th>当前版本</th>
                    <th>发布时间</th>
                    <th>状态</th>
                    <th>操作</th>
                </tr>
                </thead>
                <tbody>
                {{ range  .data_list }}
                    <tr>
                        <td>{{ .ID }}</td>
                        <td>{{ .Platfm.Prj.PrjName }}</td>
                        <td>{{ .Platfm.PlatfmName }}</td>
                        <td>{{ .ReleaseHost }}</td>
                        <td>{{ .ProxyHost }}</td>
                        <td name="vs">
                            {{ if .CurVersion }}
                                <a class="btn btn-xs btn-success" href="javascript:;" name="code-vs" title="点击同步"
                                   release_id="{{ .ID }}">{{ .CurVersion }}</a>
                            {{ else }}
                                <a class="btn btn-xs btn-success" href="javascript:;" name="code-vs" title="点击同步"
                                   release_id="{{ .ID }}">未同步</a>
                            {{ end }}
                        </td>
                        <td>{{ .PackageTime }}</td>

                        <td>
                            {{ if .Status }}
                                <a class="btn btn-xs btn-warning" href="javascript:;"
                                   release_id="{{ .ID }}">正在发布</a>
                            {{ else }}
                                <a class="btn btn-xs btn-success" href="javascript:;"
                                   release_id="{{ .ID }}">可发布</a>
                            {{ end }}
                        </td>

                        <td>
                            <a class="btn btn-xs btn-success" href="javascript:;" name="code-release"
                               release_id="{{ .ID }}" style="text-decoration:none;" title="发布"><span
                                        class="fa fa-mouse-pointer"></span> </a>
                            <a class="btn btn-xs btn-warning" href="javascript:;" name="code-hotup"
                               release_id="{{ .ID }}" style="text-decoration:none;" title="热更发布"><span
                                        class="fa fa-mouse-pointer"></span> </a>
                            <a class="btn btn-xs btn-info" href="javascript:;" name="edit-release"
                               release_id="{{ .ID }}" style="text-decoration:none;" title="修改"><span
                                        class="fa fa-pencil"></span></a>
                            <a class="btn btn-xs btn-danger" href="javascript:;" name="del-release"
                               release_id="{{ .ID }}" style="text-decoration:none;" title="删除"><span
                                        class="fa fa-trash"></span></a>
                        </td>
                    </tr>

                {{end}}

                </tbody>
            </table>
        </div>
        <!-- /.card-body -->
        <div class="card-footer clearfix">

        </div>
    </div>
    <!-- /.card -->
</div>

<!--模态框-->
<!--添加-->
<div class="modal fade" id="addModal" tabindex="-1" role="dialog" aria-labelledby="addModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="addModalLabel">添加</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                        style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">平台:</label>
                    <div class="col-sm-6">
                        <select name="" id="release-platfm" class="form-control">
                            {{ range .platfm_list }}
                                <option value="{{ .ID }}">{{ .Prj.PrjName }}-{{ .PlatfmName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>
                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">目标IP:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="IP地址" id="release-host">
                    </div>
                </div>

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">中转IP:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="默认留空" id="proxy-host">
                    </div>
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="add-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/添加-->

<!--修改-->
<div class="modal fade" id="editModal" tabindex="-1" role="dialog" aria-labelledby="editModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="editModalLabel">修改</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                        style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group row">
                    <label class="col-sm-3 col-form-label text-right">平台:</label>
                    <div class="col-sm-6">
                        <select name="" id="edit-release-platfm" class="form-control">
                            {{ range .platfm_list }}
                                <option value="{{ .ID }}">{{ .Prj.PrjName }}-{{ .PlatfmName }}</option>
                            {{ end }}
                        </select>
                    </div>
                </div>

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">目标IP:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="IP地址" id="edit-release-host">
                    </div>
                </div>

                <div class="form-group row" style="margin-top: 20px">
                    <label class="col-sm-3 col-form-label text-right">中转IP:</label>
                    <div class="col-sm-6">
                        <input type="text" class="form-control my-radius" placeholder="中转IP" id="edit-proxy-host">
                    </div>
                </div>

            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="edit-sub">提交</button>
            </div>
        </div>
    </div>
</div>
<!--/修改-->


<div class="modal fade" id="hotupModal" tabindex="-1" role="dialog" aria-labelledby="hotupModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header color-back">
                <h6 class="modal-title pull-left" id="hotupModalLabel">热更</h6>
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"
                        style="color: white;font-family: -webkit-pictograph;">
                    <span aria-hidden="true">&times;</span>
                </button>
            </div>
            <div class="modal-body">
                <div class="form-group row" style="margin-top: 10px">
                    <label class="col-form-label text-right">路径:</label>
                    <input class="form-control" id="hotup-file-path" value="ebin/">
                </div>
                <div class="form-group row" style="margin-top: 10px">
                    <label class="col-form-label text-right">热更文件:</label>
                    <textarea class="form-control" placeholder="file1,file2,file3,..." id="hotup-file"></textarea>
                </div>
                <div class="form-group row" style="margin-top: 10px">
                    <label class="col-form-label text-right">(可留空)</label>
                    <div class="input-group input-group">
                        <div class="input-group-prepend">
                            <button type="button" class="btn btn-info">文件</button>
                        </div>
                        <input type="file" class="form-control" style="color: #20B320;line-height: 20px" id="upload-file">
                    </div>
                </div>
            </div>

            <div class="modal-footer color-gray">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button type="button" class="btn btn-info" id="hotup-sub">提交</button>
            </div>
        </div>
    </div>
</div>

<!--/模态框-->

